import request from '@/config/axios'

export interface ProductAccessItemVO {
  id: number
  productAccessId: number
  categoryName: string
  resultValue: string
  typeName: string
  itemCode: string
}

// 查询产品准入项列表
export const getProductAccessItemPage = async (params) => {
  return await request.get({ url: `/hutai/product-access-item/page`, params })
}

// 查询产品准入项详情
export const getProductAccessItem = async (id: number) => {
  return await request.get({ url: `/hutai/product-access-item/get?id=` + id })
}

// 新增产品准入项
export const createProductAccessItem = async (data: ProductAccessItemVO) => {
  return await request.post({ url: `/hutai/product-access-item/create`, data })
}

// 修改产品准入项
export const updateProductAccessItem = async (data: ProductAccessItemVO) => {
  return await request.put({ url: `/hutai/product-access-item/update`, data })
}

// 删除产品准入项
export const deleteProductAccessItem = async (id: number) => {
  return await request.delete({ url: `/hutai/product-access-item/delete?id=` + id })
}

// 导出产品准入项 Excel
export const exportProductAccessItem = async (params) => {
  return await request.download({ url: `/hutai/product-access-item/export-excel`, params })
}
